#pragma once

#include <vector>
#include <map>
#include "HashedString.h"
#include "Pointer.h"
#include "TinyXML2.h"

class INode
{
public:
	typedef std::vector<Pointer<INode>> Vector_t;
	typedef std::map<HashedString, Pointer<INode>> Map_t;
	typedef std::pair<HashedString, Pointer<INode>> Pair_t;

	INode();
	virtual ~INode();

	virtual HashedString Type() const = 0;
	virtual void Enable() = 0;
	virtual void Disable() = 0;

	void Remove();
	virtual Vector_t& getChildren();
	virtual void Push_Back( Pointer<INode>& node );
	virtual void Pop_Back( INode* node );
	
	INode* getParent();
	void setParent( INode* parent );
protected:
	INode* m_parent;
	Vector_t m_children;
};